package com.javacoo.fastdfs.client.api.template;

import org.csource.common.MyException;
import org.csource.fastdfs.StorageClient1;

import java.io.IOException;
import java.util.Optional;

/**
 * 执行器函数式接口
 * <p>说明:</p>
 * <li></li>
 *
 * @author duanyong@jccfc.com
 * @date 2020/5/1 23:24
 */
@FunctionalInterface
public interface Executor<R> {
    /**
     * 执行器
     * <p>说明:</p>
     * <li></li>
     * @author duanyong@jccfc.com
     * @date 2020/5/1 23:24
     * @param storageClient 存储客户端
     */
    Optional<R> execute(StorageClient1 storageClient) throws IOException, MyException;
}
